#include "nad_hlampe.h"
#include "../GlobalVars/vars.h"
#include "../TextureFunctions/texturefunctions.h"
#include <GL/gl.h>



// Camera parameters:
//	Look-from = (-31.3493, 36.3429, -40.335)
//	Look-at = (-43.048, 27.5689, -52.0337)
//	Look-up = (0, 1, 0)
//	Clipping, near = 0.01, far = 1e+006
//	Field-of-view = 0.489957, image-aspect-ratio = 1.33333
//	Window size = (0.666667, 0.5), focal-distance = 10

// Current light source name = "defaultambient"
//	Light = Ambient
//	color = (1, 1, 1)
//	intensity = 1

// Polygons for object 'lampen' (34 polygons)

	void
hlampe()
{
	static GLfloat VertexData[] = {
		-43.5324f, 25.0746f, -48.0337f, -43.5324f, 25.0746f, -48.0337f, -43.5324f, 25.0746f, -48.0337f, 
		-43.5324f, 25.0746f, -48.0337f, -43.2873f, 26.0655f, -48.0337f, 
		-43.2873f, 26.0655f, -56.0337f, -43.5123f, 25.0911f, -48.0337f, 
		-43.5123f, 25.0911f, -56.0337f, -42.7858f, 26.0642f, -48.0337f, 
		-42.7858f, 26.0642f, -56.0337f, -43.2858f, 26.0642f, -48.0337f, 
		-43.2858f, 26.0642f, -56.0337f, -42.7858f, 26.0642f, -48.0337f, 
		-42.7858f, 26.0642f, -56.0337f, -43.2858f, 26.0642f, -48.0337f, 
		-43.2858f, 26.0642f, -56.0337f, -42.7885f, 26.0699f, -48.0337f, 
		-42.7885f, 26.0699f, -56.0337f, -42.5636f, 25.0956f, -48.0337f, 
		-42.5636f, 25.0956f, -56.0337f, -43.0155f, 30.0632f, -48.6743f, 
		-43.0155f, 30.0632f, -48.6743f, -43.0155f, 30.0632f, -48.6743f, 
		-43.0155f, 26.0763f, -48.6743f, -43.0155f, 26.0763f, -48.6743f, 
		-43.0155f, 26.0763f, -48.6743f, -43.0155f, 30.0632f, -48.8338f, 
		-43.0155f, 30.0632f, -48.8338f, -43.0155f, 30.0632f, -48.8338f, 
		-43.0155f, 26.0763f, -48.8338f, -43.0155f, 26.0763f, -48.8338f, 
		-43.0155f, 26.0763f, -48.8338f, -43.1076f, 30.0632f, -48.8338f, 
		-43.1076f, 30.0632f, -48.8338f, -43.1076f, 30.0632f, -48.8338f, 
		-43.1076f, 26.0763f, -48.8338f, -43.1076f, 26.0763f, -48.8338f, 
		-43.1076f, 26.0763f, -48.8338f, -43.1076f, 30.0632f, -48.6743f, 
		-43.1076f, 30.0632f, -48.6743f, -43.1076f, 30.0632f, -48.6743f, 
		-43.1076f, 26.0763f, -48.6743f, -43.1076f, 26.0763f, -48.6743f, 
		-43.1076f, 26.0763f, -48.6743f, -43.0155f, 30.0632f, -54.9543f, 
		-43.0155f, 30.0632f, -54.9543f, -43.0155f, 30.0632f, -54.9543f, 
		-43.0155f, 26.0763f, -54.9543f, -43.0155f, 26.0763f, -54.9543f, 
		-43.0155f, 26.0763f, -54.9543f, -43.0155f, 30.0632f, -55.1138f, 
		-43.0155f, 30.0632f, -55.1138f, -43.0155f, 30.0632f, -55.1138f, 
		-43.0155f, 26.0763f, -55.1138f, -43.0155f, 26.0763f, -55.1138f, 
		-43.0155f, 26.0763f, -55.1138f, -43.1076f, 30.0632f, -55.1138f, 
		-43.1076f, 30.0632f, -55.1138f, -43.1076f, 30.0632f, -55.1138f, 
		-43.1076f, 26.0763f, -55.1138f, -43.1076f, 26.0763f, -55.1138f, 
		-43.1076f, 26.0763f, -55.1138f, -43.1076f, 30.0632f, -54.9543f, 
		-43.1076f, 30.0632f, -54.9543f, -43.1076f, 30.0632f, -54.9543f, 
		-43.1076f, 26.0763f, -54.9543f, -43.1076f, 26.0763f, -54.9543f, 
		-43.1076f, 26.0763f, -54.9543f
	};
	static GLfloat NormalData[] = {
		0.000000f, 1.00000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 1.00000f, 0.000000f, 0.974370f, -0.224952f, 0.000000f, 
		0.974370f, -0.224952f, 0.000000f, 0.974370f, -0.224952f, 0.000000f, 
		0.974370f, -0.224952f, 0.000000f, 0.000000f, -1.00000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, -1.00000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, -1.00000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, -1.00000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.974370f, 0.224949f, 0.000000f, 
		0.974370f, 0.224949f, 0.000000f, 0.974370f, 0.224949f, 0.000000f, 
		0.974370f, 0.224949f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, 1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, -1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, 0.000000f, -1.00000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		-1.00000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, -1.00000f, 
		0.000000f, -1.00000f, 0.000000f, -1.00000f, 0.000000f, 0.000000f, 
		0.000000f, 0.000000f, -1.00000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, 1.00000f, -1.00000f, 0.000000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 
		-1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, 1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, -1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, 0.000000f, -1.00000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		-1.00000f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, -1.00000f, 
		0.000000f, -1.00000f, 0.000000f, -1.00000f, 0.000000f, 0.000000f, 
		0.000000f, 0.000000f, -1.00000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, 1.00000f, -1.00000f, 0.000000f, 0.000000f, 
		0.000000f, -1.00000f, 0.000000f, 0.000000f, 0.000000f, 1.00000f, 
		-1.00000f, 0.000000f, 0.000000f
	};
	static GLfloat TexCoordData[] = {
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 1.00000f, 
		1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 1.00000f, 
		1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 1.00000f, 
		1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 1.00000f, 
		1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 
		1.00000f, 1.00000f, 0.000000f, 1.00000f, 
		0.000000f, 1.00000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 
		1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 1.00000f, 1.00000f, 
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 1.00000f, 
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 
		0.000000f, 0.000000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 
		1.00000f, 1.00000f, 0.000000f, 1.00000f, 
		0.000000f, 1.00000f, 1.00000f, 0.000000f, 
		0.000000f, 0.000000f, 1.00000f, 0.000000f, 
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 
		1.00000f, 1.00000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 1.00000f, 1.00000f, 
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 
		1.00000f, 0.000000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f, 0.000000f, 1.00000f, 
		0.000000f, 1.00000f, 1.00000f, 1.00000f, 
		0.000000f, 0.000000f, 0.000000f, 0.000000f, 
		1.00000f, 0.000000f
	};
	static GLint Indices[] = {
		0, 2, 3, 0, 3, 1, 4, 6, 7, 4, 7, 5, 8, 10, 11, 8, 
		11, 9, 12, 14, 15, 12, 15, 13, 16, 18, 19, 16, 19, 17, 22, 25, 
		28, 25, 31, 28, 27, 30, 34, 30, 37, 34, 33, 36, 40, 36, 43, 40, 
		39, 42, 21, 42, 24, 21, 38, 20, 32, 20, 26, 32, 23, 41, 29, 41, 
		35, 29, 46, 49, 52, 49, 55, 52, 51, 54, 58, 54, 61, 58, 57, 60, 
		64, 60, 67, 64, 63, 66, 45, 66, 48, 45, 62, 44, 56, 44, 50, 56, 
		47, 65, 53, 65, 59, 53
	};

	glEnableClientState(GL_TEXTURE_COORD_ARRAY);
	glTexCoordPointer(2, GL_FLOAT, 0, TexCoordData);
	glEnableClientState(GL_NORMAL_ARRAY);
	glNormalPointer(GL_FLOAT, 0, NormalData);
	glEnableClientState(GL_VERTEX_ARRAY);
	glVertexPointer(3, GL_FLOAT, 0, VertexData);

		// Material attributes for surface '..\R063_D.jpg'
	OGL_Set_Current_Material_Parameters(32.0000f, 1.00000f, 1.00000f, 1.00000f, 0.000000f, 0.000000f, 0.000000f);

	// Set a new diffuse texture map
	OGL_Set_Current_Texture_Map(kran_eisen03_64, 1.00000f, 1.00000f, 0.000000f, 0.000000f);

	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[0]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[3]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[6]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[9]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[12]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[15]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[18]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[21]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[24]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[27]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[30]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[33]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[36]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[39]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[42]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[45]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[48]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[51]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[54]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[57]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[60]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[63]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[66]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[69]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[72]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[75]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[78]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[81]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[84]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[87]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[90]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[93]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[96]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[99]);
}	// End of polygons for object 'lampen'
